
package ui.adapter;

import android.content.Context;

import net.ck.hzq.R;

import java.util.ArrayList;
import java.util.List;

import Bean.HistoricalincomeBean;
import base.BaseViewHolder;
import base.SuperBaseAdapter;


/**
 * 历史收益适配器
 * Created by chenjian on 19/2/27.
 */
public class HistoricalIcomeAdapter extends SuperBaseAdapter<HistoricalincomeBean.DataBean.ItemsBean> {

    List<HistoricalincomeBean.DataBean.ItemsBean> mData = new ArrayList<>();
    Context mContext;

    public HistoricalIcomeAdapter(Context context, List<HistoricalincomeBean.DataBean.ItemsBean> data) {
        super(context, data);
        mContext = context;
        mData = data;
    }

    @Override
    protected void convert(BaseViewHolder holder, final HistoricalincomeBean.DataBean.ItemsBean item, final int position) {
        holder.setText(R.id.historicalincome_txt1, item.getMonth()).setText(R.id.historicalincome_txt2, item.getJye())
                .setText(R.id.historicalincome_txt3, "+" + item.getSy());

    }


    @Override
    protected int getItemViewLayoutId(int position, HistoricalincomeBean.DataBean.ItemsBean item) {
        return R.layout.listviewhistoricalincome_item;
    }

}
